Error 4 Access Rights Troubleshooting
Problem: User is having a problem accessing COGZ Preventative Maintenance Software, getting a runtime error, an Error 4 occurring during program initialization unable to write to the Windows directory or the user application directory, or specifically a message explaining that the program cannot get write access to the C:\Windows\cogzpass.tps file so trying read-only. Example error messages:
Resolution: See if you can locate the cogzw.ini file anywhere on these machines with the problems. Notice the location of the files since they are usually in the Windows (C:\Windows) folder on the computer. If these files cannot be written to that particular drive, then it looks for the user directory in the C drive to write there instead (C:\Documents and Settings\(User login/name)\Application Data\cogz). The files that need to be read/write/delete access: cogzw.ini, cogzwscr.ini, cogzpass.tps. Your probably also want to check the dates on these files to see if they are recent. If there is a problem writing to the user directory as well, perhaps this might be causing the error message when the user attempts to login. Be sure either the Windows folder or the user’s folder in Documents and Settings have read/write/delete rights. If the second destination user folder (documents and settings user folder) does not exist, you can even create it as long as it has the read/write access and contains the three files mentioned above. Additional information on COGZ preventative maintenance software startup procedures are as follows:
What happens when COGZ Preventative Maintenance Software starts:
- COGZ asks your system where Windows is located with Windows API call – GetWindowsDirectory.
- Try to write 3 COGZ data files to the windows folder.
- If the windows folder write fails COGZ will then try the USERS data folder.
- COGZ gets the User Login Name, using the Windows API call – WNetGetUser.
- It then will try to create a COGZ USER Data folder on the DRIVE LETTER that was reported back from the Windows API call from step 1, WIN API GetWindowsDirectory and for USER, from step 4, WIN API WNetGetUser
- This is the folder that will be used is:(Drive Letter from API call)\Documents and Settings\Application Data\(USER from the Windows API call).
- The (Drive Letter from API call)\Documents and Settings\Application Data\ structure must previously exist. COGZ will only try to append a new COGZ Data folder on to the end of this structure.
- This is where the cogzpass.tps, cogzw.ini, and cogzscr.ini files will be located.
- If this folder and/or files cannot be created because of security restrictions then COGZ will not run.
If your problem is not discussed above, then follow the problem reporting information here.